package com.magist.manage.copyrights.service;

import com.github.pagehelper.PageInfo;
import com.magist.core.entity.Page;
import com.magist.core.service.BaseService;
import com.magist.manage.copyrights.dto.SupplyInfoDto;
import tk.mybatis.mapper.entity.Example;

import  com.magist.manage.copyrights.entity.SupplyInfo;

import java.util.List;

public interface SupplyInfoService extends BaseService<SupplyInfo>{

    /**
     * 分页方法
     * @param example
     * @param page
     * @return
     */
    PageInfo<SupplyInfo> page(Example example, Page page);

    /**
     * 添加供应商
     * @param supplyInfoDto
     */
    void addSupply(SupplyInfoDto supplyInfoDto);

    int updateSupplyInfo(SupplyInfoDto supplyInfoDto);

    /**
     * 通过供应商名称查询
     * @param nickName
     * @return
     */
    List<SupplyInfo> findByNickName(String nickName);

    /**
     * 批量添加
     * @param supplyInfoDtos
     */
    void doBatchAdd(List<SupplyInfoDto> supplyInfoDtos);

    List<SupplyInfo> findByCreateById(String userId);
}